Ext.define('CancelOrder.controller.CancelOrder', {
			extend : 'Ext.app.Controller',
			config : {
				refs : {
					cancelorderlist : '#cancelList'
				},
				control : {
					cancelorderlist : {
						itemtap : 'submitForm'
					}
				}
			},
			submitForm : function(cmp, index, target, record) {
				if(record.get('hno') == null){
					return;
				}
				Ext.Msg.confirm('系统提示', '是否确认退订此房间?', function(res) {
							if (res == 'yes') {
								 Ext.data.JsonP.request({
									    url: 'http://'+Config.utils.SERVER_IP+':'+Config.utils.SERVER_PORT + Config.utils.SERVER_ProjectName + '/order/cancelOrder',
									    callbackKey: 'callback',
									    params: {
									        id: record.get('id'),
									        hno:record.get('hno')
									    },
									    success: function(result,request){
									    	Ext.Msg.alert("系统提示","退订成功！");
								    		cmp.getStore().load();
									    }
								});
							}
						});
			}
		});
